package com.study.controller;

import com.study.pojo.resp.ResultMessage;
import com.study.service.MemberEducationService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/education")
public class MemberEducationController {
    @Autowired
    MemberEducationService memberEducationService;

    @RequestMapping("/findAll")
    public ResultMessage findAll(){
        return memberEducationService.selectAll();
    }

    @RequestMapping("/queryById/{id}")
    public ResultMessage queryById(@PathVariable("id") String id){
        return memberEducationService.queryById(Integer.parseInt(id));
    }
}
